package com.feng.chat.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Data;

/**
 * <p>
 * 聊天群组成员表
 * </p>
 *
 * @author dyf
 * @since 2022-05-31
 */

@Data
@TableName("group_member")
public class GroupMember implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 群成员ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 群ID
     */
    private Integer groupId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 成员属性[0:普通成员;1:管理员;2:群主;]
     */
    private Integer leader;

    /**
     * 是否禁言[0:否;1:是;]
     */
    private Integer isMute;

    /**
     * 是否退群[0:否;1:是;]
     */
    private Integer isQuit;

    /**
     * 群名片
     */
    private String userCard;

    /**
     * 入群时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 退群时间
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime deletedAt;


}
